package com.zoro.jianyue.utils;

import android.content.Context;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.zoro.jianyue.interactor.CommonListInteractor;

import java.util.GregorianCalendar;

/**
 * Created by CM-ZR on 2016/1/29.
 */
public class VolleyHelper {
    private static volatile VolleyHelper instance = null;
    private RequestQueue requestQueue = null;

    public VolleyHelper() {

    }

    public static VolleyHelper getInstance() {
        if (null == instance) {
            synchronized (VolleyHelper.class) {
                instance = new VolleyHelper();
            }
        }
        return instance;
    }

    /**
     * get request queue
     *
     * @return
     */
    public RequestQueue getRequestQueue() {
        if (null != requestQueue) {
            return requestQueue;
        } else {
            throw new IllegalArgumentException("RequestQueue is not initialized.");
        }
    }
}
